home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / printfx / explain.a < prev    next >
Text File  |  1989-06-08  |  2KB  |  89 lines

  1.     INCLUDE    "exec/types.i"
  2.     INCLUDE    "libraries/dos.i"
  3.     INCLUDE    "libraries/dos_lib.i"
  4.  
  5. NEWLINE    equ    $0a
  6.  
  7.     xdef    _Explain,_ConMsg,_ErrMsg,StrLen,_strlen
  8.  
  9.     CSECT    text,0,0,1,2
  10.  
  11. _Explain
  12.     tst.b    _Er(a4)
  13.     beq.s    Rtn
  14.     lea.l    ExplMsg1(pc),a0
  15.     bsr.s    WrtCon
  16.     move.l    _Pr(a4),a0
  17.     bsr.s    WrtCon
  18.     lea.l    ExplMsg2(pc),a0
  19.     bra.s    WrtCon
  20. _ConMsg
  21.     move.l    4(a7),a0
  22.     bra.s    WrtCon
  23. _ErrMsg
  24.     tst.b    _Er(a4)
  25.     beq.s    Rtn
  26.     move.l    _Pr(a4),a0
  27.     bsr.s    WrtCon
  28.     lea.l    Colon(pc),a0
  29.     bsr.s    WrtCon
  30.     move.l    4(a7),a0
  31.     bsr.s    WrtCon
  32.     move.l    8(a7),a0
  33.     bsr.s    WrtCon
  34.     lea.l    NewLine(pc),a0
  35.  
  36. WrtCon    movem.l    d2/d3,-(a7)
  37.     move.l    a0,d2
  38.     bsr.s    StrLen
  39.     move.l    d0,d3
  40.     move.l    _ConOut(a4),d1
  41.     move.l    _DOSBase(a4),d6
  42.     jsr    _LVOWrite(a6)
  43.     movem.l    (a7)+,d2/d3
  44. Rtn    rts
  45.  
  46. _strlen    move.l    4(a7),a0
  47. StrLen    moveq.l    #-1,d0
  48. Count    addq.l    #1,d0
  49.     tst.b    (a0)+
  50.     bne.s    Count
  51.     rts
  52.  
  53. ExplMsg1
  54.   dc.b 'Syntax:   ',0
  55. ExplMsg2
  56.   dc.b ' [<source>]',NEWLINE
  57.   dc.b 'Function: initiate FX-80+ printer and print file ',NEWLINE
  58.   dc.b 'Options:',NEWLINE
  59.   dc.b '    -s    no output via stderr',NEWLINE
  60.   dc.b '    -l<i>    left margin (5)',NEWLINE
  61.   dc.b '    -r<i>    right margin (max)',NEWLINE
  62.   dc.b '    -x    donot truncate',NEWLINE
  63.   dc.b '    -p<i>    lines per page (auto)',NEWLINE
  64.   dc.b '    -n<i>    linespace in dots/3 (29)',NEWLINE
  65.   dc.b '    -m<i>    printer mode, overruling other settings (see manual)',NEWLINE
  66.   dc.b '    -q    low height, superscript',NEWLINE
  67.   dc.b '    -el    elite (default)',NEWLINE
  68.   dc.b '    -p    pica',NEWLINE
  69.   dc.b '    -c    condensed',NEWLINE
  70.   dc.b '    -en    enlarged',NEWLINE
  71.   dc.b '    -em    emphasized',NEWLINE
  72.   dc.b '    -d    double strike',NEWLINE
  73.   dc.b '    -v    variable pitch (proportional)',NEWLINE
  74.   dc.b '    -i<i>    paperlength in inches (11)',NEWLINE
  75.   dc.b '    -ed    paper end detection off',NEWLINE
  76.   dc.b '    -y    donot adjust paper',NEWLINE
  77.   dc.b '    -t[<your special title>]  print title',NEWLINE
  78.   dc.b '    -o    output is standard',NEWLINE
  79.   dc.b 0
  80.  
  81. Colon    dc.b    ': ',0
  82. NewLine dc.b    NEWLINE,0
  83.  
  84.     xref    _Er,_ConOut,_DOSBase,_Pr
  85.  
  86.  
  87.     END
  88.  
  89.